package com.maruti.otterapi.linkposts;

import com.maruti.otterapi.ListParameters;

public class LinkpostsRequest {

	private String url;
	private String contains;
	private String tracktype;
	private ListParameters listParams;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getContains() {
		return contains;
	}

	public void setContains(String contains) {
		this.contains = contains;
	}

	public String getTracktype() {
		return tracktype;
	}

	public void setTracktype(String tracktype) {
		this.tracktype = tracktype;
	}

	public ListParameters getListParams() {
		return listParams;
	}

	public void setListParams(ListParameters listParams) {
		this.listParams = listParams;
	}

	public String toQuery() {
		String queryStr = "";
		queryStr += "url=" + url;
		if (contains != null)
			queryStr += "&contains=" + contains;
		if (tracktype != null)
			queryStr += "&tracktype=" + tracktype;
		if (listParams != null)
			queryStr += listParams.toQuery();

		return queryStr;
	}
}
